The present invention generally relates to systems for managing data storage, and more particularly, to systems and techniques which provide host computer system control over data that is cached within data storage systems.
The rapid growth of information service and data processing industries has resulted in a need for data storage systems to efficiently manage and store large amounts of data. Typically, a data storage system that serves this need includes a plurality of high-capacity high-performance disk drives along with some processing circuitry that can store data to and retrieve data from the disk drives. To achieve high-performance when either storing or retrieving data on behalf of computer systems coupled to the data storage system, some data storage systems include an internal cache memory system that serves as an electronic buffer for data being transferred into (i.e. written) or out of (i.e., read from) the disk drives that operate within the data storage system. Since disk drives are highly mechanical in nature, they provide relatively slow access to data as compared to a cache memory system which is fully electronic. As such, a data storage system can use an internal cache memory system as a high-speed storage area for data which host computer systems access.
Certain conventional data storage systems are equipped with logic or processing circuitry which attempts to efficiently utilize an internal cache memory system. Efficient use of a cache memory system is generally preferable because a typical cache memory system is limited in size and is often shared for use by all host computer systems that request access to data within the data storage system. For example, if two host computer systems are coupled to the data storage system and are attempting to concurrently read respective streams of data from the data storage system, the data storage system may use the cache to buffer portions of each stream of data. One conventional attempt to optimally utilize an internal cache memory system in this manner is called xe2x80x9cpredictive caching.xe2x80x9d
Predictive caching can detect a sequence of sequential or related access requests to sequentially locate data locations within the data storage system. Upon detecting such a sequence, a predictive caching process in the data storage system can read ahead from a current physical storage location (e.g., from a most recent read operation) and can fill up a portion of the cache memory system with data that the predictive caching process xe2x80x9cpredictsxe2x80x9d will be needed by future read requests. In this manner, predictive caching attempts to use data access pattern recognition techniques such as detecting multiple sequential reads from successively incremental physical disk locations to predict what data will be requested in the future. Based on this prediction, the predictive caching process can then access and cache data before the data storage system actually receives access requests for data.
As a more specific use of predictive caching, consider a scenario in which a host computer system is performing a sequential file access operation, such as might occur during a backup operation of a large file stored within the data storage system onto a tape. The sequential file access operation operates by reading the entire contents of the file byte by byte from physical data storage locations, starting at the beginning of the file and continuing to the end of the file. Without predictive caching, the data storage system handles each read operation within the sequential file access operation as a separate and relatively slow access to data within the disk drives in the data storage system. However, a data storage system that uses predictive caching can detect the sequential pattern of data accesses and can read ahead from the current location in the sequence to place data into the cache memory system. Then, for subsequent read operations that occur during the sequential file access operation, the data storage system can attempt to service those read operations using data from the cache memory system instead of having to service each read operation using disk drive processing circuitry. By detecting access to sequential locations in the disk drives and reading data into the cache memory system before that data is requested, and by servicing future data access requests from the cache using that data, performance of the data storage system using predictive caching is somewhat increased.
Other conventional cache control technologies exist as well. For instance, some data storage systems, such as certain data storage systems of the Symmetrix line manufactured by EMC corporation of Hopkinton, Mass., include a cache control software interface which allows an application on a host computer system to externally control caching of data within the internal cache of the data storage system. For example, an application that routinely uses a specific file can include embedded calls to functions within the cache control software interface which can instruct the data storage system to permanently cache the file within its internal cache memory system. As the application executes on the host computer system and requests access to the file from the data storage system, the data storage system can provide such access from its internal cache memory system instead of having to service such access requests via access to the disk drives in the data storage system.
There are a variety of shortcomings related to the aforementioned conventional techniques of caching data within a data storage system. For example, conventional predictive caching techniques rely on the ability to detect a pattern or sequence of sequential physical access requests to data storage locations within disk drives in the data storage system. It is not until a predictive caching process detects such a pattern or sequence that caching of data can occur. This results in the data storage system having to process a number of data access requests without caching prior to the predictive caching process detecting the sequence of sequential access request. In other words, predictive caching cannot begin to operate until the predictive caching process in the data storage system recognizes a data access pattern. Accordingly, predictive caching does not achieve a performance gain for data access requests which occur during the period of detection of a data access patterns.
Predictive caching also suffers in part from a problem related to caching unnecessary data. Once a predictive caching process within the data storage system detects a sequential access pattern to data, the predictive caching process caches a certain amount of data in the internal cache memory system within the data storage system. However, since the predictive caching process is unaware of precisely how much data is required to be cached, the predictive caching process may unknowingly cache more data than is actually required. This results in an inefficient use of the cache memory system which is an expensive resource within the data storage system.
Predictive caching may cache unnecessary data in a variety of circumstances. By way of example, consider a scenario in which a sequential file access operation is nearing completion of access to the file. During the sequential access operation, a conventional predictive caching process periodically caches large blocks of data into the internal cache memory system in the data storage system in an attempt to anticipate future read requests for such data. However, when the sequential access operation has completed reading the last portion of data for the file being accessed, the sequential access operation will no longer issue read requests for further data in the cache. However, since the predictive caching algorithm is unaware of the precise use of the data which is cached, the predictive caching algorithm, during its most recent predictive caching operation, may have cached significantly more data from physical disk locations that extend well beyond the physical disk locations corresponding to the end of the file being accessed. Accordingly, any data from physical disk locations after the end of the file that the predictive caching algorithm places in the cache will go unused. Such unnecessary cached data occupies cache resources that could be used for other caching operations.
Another problem with conventional data storage system caching techniques arises due to file and disk fragmentation issues. In computer systems that use open systems operating systems such as Unix, a single file created by the operating system may be physically stored in fragments which may be located across many non-sequential areas of one or more disk drives within a data storage system. In other words, certain operating systems allow a single file to be broken up into smaller fragments which may be respectively stored in any unused areas within a data storage system which are large enough to accommodate the respective individual fragments. By fragmenting a file in this manner, physical disk space within a data storage system is put to optimal use. From the perspective of a software application on a host computer system however, file system processing within the operating system on the host computer system manages and tracks the diverse locations of the fragments of a file as a set of disk extents maintained by the file system. This allows the operating system to present the file logically to software applications as a single cohesive or continuous portion of data.
While fragmentation of files or other data may provide for optimal use of disk space, fragmentation poses problems to conventional data storage system caching operations. For example, returning to the aforementioned example of backing up a file, suppose the file is fragmented across a number of different physical locations within the disk drives of a data storage system. When the conventional predictive caching process in the data storage system detects the initial pattern of sequential read requests for data from the first fragment of the file, the predictive caching process attempts to read ahead from the most recent physical access location in the disk drive in order to cache data to service future read requests. However, as the backup process issues further read requests to backup data from locations of the file which span two non-sequentially located fragments of file data stored in the disk drives within the data storage system, the first read request for the first portion of data from a different fragment of the file will request data from the data storage system that is most likely not in the cache. This will result in a xe2x80x9ccache missxe2x80x9d which decreases data storage system performance. The cache miss also causes the data storage system to retrieve the data from the disk drives at the location of the next fragment of the file, as specified in the most recent read request, instead of using cached data.
Moreover, fragmentation also causes the problem of caching unnecessary data because the most recent predictive caching operation most likely will have cached data that extends beyond the end of the file fragment. This data is not relevant to the stream of read requests from the backup process to obtain data from the file (e.g., in this example, predictive caching caches data which is not part of the file being backed up).
Further still, fragmentation causes a break in the predictive caching pattern of sequential read requests and thus the predictive caching process will not reinstate predictive caching again until the process can detect a sufficient number of read requests from another fragment of the file that establish a sequential access pattern. Such problems will be repeated over and over for each fragment as the physical locations of data being read from the file within the data storage system are sequentially broken from each fragment to the next.
Generally speaking, conventional predictive caching techniques, also sometimes referred to as data xe2x80x9cprefetchingxe2x80x9d techniques, are most beneficial for only truly sequentially arranged data such as that stored by mainframes. Such conventional techniques can suffer to various degrees from the aforementioned problems when used for caching data which is arranged non-sequentially within a data storage system.
Turning attention now to the conventional techniques of using a cache control software interface from within an application performing on a host computer system to control caching in a data storage system, such techniques also suffer from a number of deficiencies. An application that uses the conventional cache control software interface must be modified to take advantage of such an interface. Typically, this requires knowledge of the existence of the cache control software interface during the software development process for that application. The software developer must have specialized knowledge about how to incorporate function calls which properly manipulate the cache control software interface to cause the data storage system to cache the appropriate data on behalf of the application incorporating such function calls. For pre-existing or legacy applications, the source code for such applications is rarely available to allow the incorporation of such custom function calls, and if it were available, significant amounts of evaluation, development, debugging and testing time must be spent in order to modify an existing application to take advantage of a cache control software interface.
In contrast to the aforementioned conventional caching techniques, the present invention provides systems, methods and techniques which optimize the use of cache memory systems within data storage systems. In general, the system of the invention allows a host computer system to more precisely control cache operations within a data storage system in a variety of circumstances and does not require specific modification to applications within the host computer system. Instead, the system of the invention provides a generic host-based cache controller which can intercept requests for access to data (e.g., file system or other requests to read, write, open, seek, etc.) which occur within a host computer system. The invention compares such requests to a variety of different prefetch criteria. Based on such comparisons, the system of the invention determines prefetch information. Prefetch information indicates how data that is related to the data for which access is requested, hereinafter referred to as xe2x80x9crelated data,xe2x80x9d is to be cached within the cache memory system of the data storage system which stores such related data.
Related data may include the actual data specified in the request to access data, or related data may be any other data that is somehow associated or related to the data specified in the request to access data. For example, if the request to access data requests xe2x80x9creadxe2x80x9d access to a portion of a file, the related data might be the remaining portions of the file for which access has not yet been requested. Thus, in this example, prefetch information may indicate that the entire remaining portions of the file are to be placed into the cache in a data storage system coupled to the host computer system.
If the system of the invention determines that such related data should be prefetched (i.e., obtained from disk and cached) in whole or in part (i.e., as indicated by the prefetch information), the system of the invention can proceed to obtain storage information for the related data. The storage information can precisely define the storage locations of the related data within the data storage system. For example, the storage information may indicate the precise locations (e.g., disk extents) of data stored in multiple fragments across different disk drives within the data storage system for the file to which access is initially requested.
Using the storage information along with prefetch information determined based on the prefetch criteria matching the request for access to data, the system of the invention can formulate prefetch commands which are then transmitted to the data storage system and which cause the data storage system to cache data identified in the prefetch commands. In other words, the prefetch commands can specify how the data storage system is to cache the related data. Since the system of the invention operates on the host computer system and has access to precise locations (e.g., disk extents) of data to which host applications request access, the prefetch commands generated by the invention can precisely instruct a data storage system to cache only data that is relevant to the application requesting access. In this manner, the aforementioned problems of conventional caching techniques such as caching unnecessary data or having to wait to cache data until sequential access patterns are detected are significantly avoided. Moreover, since the system of the invention is general in nature and can serve requests for many applications, no modification to existing applications is required, as is the case with the use of conventional cache control software interfaces.
In certain embodiments, the invention does not remove or disable the operation of predictive caching techniques within a data storage system. Such embodiments allow the prefetch commands generated by the invention to override predictive caching operations for data specified in the prefetch commands. In other words, predictive caching can be used in situations where the invention does not provide prefetch commands to a data storage system.
More specifically, the present invention provides mechanisms and techniques that operate in a host computer system to cause a storage system coupled to the host computer system to cache data.
According to one embodiment of the invention, such a method comprises the steps of receiving a request to access data, generating a prefetch command for related data based on a comparison of the request against prefetch criteria, and transmitting the prefetch command to the storage system to cause the storage system to cache at least a portion of the related data. The request to access data may be, for example, a filesystem request from an application executing on the host computer system or on another computer system coupled to the host. In the later case, the request to access data might be sent to the host computer system over a network, using a protocol such as the Network File System (NFS) protocol.
The step of receiving traps, intercepts or otherwise obtains the request to access data (e.g., a file system request) and generates the prefetch command for related data specified or otherwise associated with the data specified in the request by comparing information in or associated with the request against prefetch criteria defined in a prefetch database. If an entry in the prefetch database matches such a comparison, the entry further defines prefetch information which indicates how the related data should be cached. The operation of generating the prefetch command also can obtain storage information for the related data, for example, from a file system or other processing technique in the host computer system. The storage information indicates storage locations which convey the precise layout of the related data within the data storage system.
The step of generating the prefetch command can then use the prefetch information along with the storage information to generate the required prefetch command which is then transmitted to the storage system to cause the storage system to prefetch the related data associated with the request to access data in a cache memory system (a cache) within the storage system. In this manner, the system of the invention alleviates the need to rely on predictive caching within the data storage system. Instead, by intercepting request(s) to access data within the host computer system and determining caching instructions and storage information for the related data within the data storage system, the invention can formulate prefetch commands within the host computer system which more precisely define how to cache the related data and which also indicate exactly where to obtain that data within the data storage system. This substantially overcomes the problems associated with conventional predictive caching techniques.
According to another embodiment of the invention, the request to access data specifies a requester requesting access to the data and specifies a data access technique for accessing the data and specifies data to which access is requested. A data type may also be specified in the request or may be determined based on the request. For instance, the requestor may be an application, a process, a user or another entity (e.g., remote computer system) identifiable within the host computer system that requests access to some data via a filename specification. The filename in the request may imply a specific type of data, such as by a file extension (e.g., filename.jpg for JPEG image data). Alternatively, the data to which access is requested may have special data (i.e., a magic number at the beginning of a file) that indicates the type of data to which access is requested. The data access technique may be a file system command such as a read, write, seek, open, close or other data access or input-output command or operation and the data may be a file, database, volume, or other portion of data stored within the data storage system.
As noted above, the related data for which the invention generates a prefetch command may be inclusive of the data specified in the request, or the related data may be other data not specifically identified in the request but that is in some manner (to be explained) associated with or related to the data specified in the request to access data. Such related data may be, for example, any remaining data of a file for which the request to access data is attempting access, or may be a portion of, or an entire remainder of a database. In this invention, related data may also include other files or portions of other files that are in some manner related to or associated with the data to which access is requested as specified in the request to access data. The relationship between the data specified in the request and the related data may be determined, for example, by an administrator configuring the prefetch information, as will be explained in more detail, or may be determined automatically such as, for example, in a case where the related data is the entire remainder of a file to which access is requested.
In this embodiment, the step of generating a prefetch command includes the steps of querying a prefetch database containing the prefetch criteria to obtain prefetch information based on the request using a prefetch query containing at least one of a) a characteristic of the data and b) a characteristic of the request to access data. Characteristics of the request to access data may include, for example, the requestor requesting access to the data and/or the data access technique for accessing the data. Characteristics of the data may include the identity of the data to which access is requested or the type of data to which access is requested. The method then formulates the prefetch command based on the prefetch information. The prefetch information includes caching instructions and may include the storage information, or, the storage information may be obtained separately. The invention may use the storage information in conjunction with the prefetch information to generate or formulate one or more prefetch commands which specify, for example, caching instruction(s) for the related data.
In yet another embodiment, the prefetch information includes caching instructions for the related data and the step of formulating the prefetch command includes the steps of obtaining storage information for the related data stored in the storage system and applying the prefetch information including the caching instructions to the storage information for the related data to generate at least one prefetch command that specifies a portion of the related data to cache in the storage system from a location in the storage system specified by the storage information. The steps operate in a host computer system such that when the prefetch command is transmitted to the storage system via the step of transmitting, the prefetch command advises the storage system to i) obtain the portion of the related data from the location, and ii) cache the portion of related data. By advises, what is meant is that the prefetch command provides instructions for the data storage system to follow. However, in certain instances such as unavailability of cache space, the data storage system might not carry out the prefetch commands. Generally however, in most circumstances, the prefetch commands will cause the data storage system to cache the related data as instructed.
In another embodiment, the caching instructions may specify that the related data is to placed into a permanent cache within the storage system such that the storage system will not remove the related data from the permanent cache until instructed to do so.
In a further embodiment, the request to access data specifies a requestor requesting access to the data and specifies a data access technique for accessing the data and specifies data to which access is requested. Also, the prefetch criteria is maintained as entries in a prefetch database, and each entry includes at least one of: i) requestor criteria indicating an identity of a requester who may request access to the data, ii) data access technique criteria indicating a type of access to the data to be made by a requestor matching the requester criteria, iii) data criteria indicating data to which access is requested according to the data access technique by a requester matching the requestor criteria. Also in this embodiment, each entry includes corresponding prefetch information that includes caching instructions that apply to the related data that is associated with or related to the data specified in a request that matches the prefetch criteria of that entry.
In still another embodiment, the request is a file system command to access data. Also, the step of receiving a request to access data includes the steps of intercepting the file system command from an application performing on the host computer system that attempts to access the data by sending the file system command to a file system in the host computer system and forwarding the file system command to a prefetch lookup process in the host computer system and forwarding the file system command to the file system in the host computer system so that the file system can perform the file system command. In this manner, the invention does not disturb conventional application operation of a host computer system by allowing requests to access data to proceed, for example, to the file system for conventional processing. In other words, the invention can trap a request access data and forward the request to both the file system and also to a prefetch lookup process which performs according to the invention. The file system command will allow the host computer system to access the data specified in the file system command, while the invention can proceed to generate prefetch command(s) for related data which might, for example, specify that any remaining un-accessed portions of the file are to be cached in the data storage system. In this example then, the related data may be the entire file (in which case the related data is inclusive of the data specified in the request to access data), or alternatively, the related data may be only the remaining un-accessed portions of the file (in which case the related data does not include the data specified in the request to access data).
In another embodiment, the request to access data is a file system request received from an application and the data is a file stored within the storage system. In this embodiment, the step of generating includes the steps of obtaining prefetch information indicating how related data from the file is to be cached in the storage system. The prefetch information is obtained based on the comparison of the request against prefetch criteria contained in a prefetch database in the host computer system. The method further obtains storage information including disk extent information indicating storage locations (e.g., physical disk extents) where the file (e.g., the related data) is stored within the storage system and generates the prefetch command based on the prefetch information and the storage information.
There are known techniques that exist within a host computer system that can obtain storage information such as disk extent information for a given portion of data, such as a file, database, volume, and the like. Such known techniques may include the use of the file system, certain operating system functions, or other mechanisms that operate within the host computer system to provide an indication of the physical locations of the data (related data in this case) stored on disks or other media within a data storage system.
The prefetch command contains instructions that instruct the storage system to obtain and cache portions of data from the file (i.e., as related data) from the storage locations within the storage system indicated by the disk extent information. Since the system of the invention operates within a host computer system, and the host computer system includes mechanisms such as an operating system and/or a file system which contain mappings of the precise physical and logical locations of data associated with files, databases or other sources, prefetch commands generated by the system of the invention can contain caching information that precisely defines what data is to be cached from which storage locations within the data storage system and thus substantially eliminates caching of unnecessary data. In other words, the prefetch commands generated in this invention are based on prefetch information that indicates what related data is to be cached and storage information that indicates exactly where that data is located within the data storage system such that the data storage system can receive such prefetch commands and can access the related data at the specified locations and can cache the related data.
In another embodiment, the prefetch command transmitted to the storage system indicates to the storage system to cache portions of the file located at the storage locations indicated by the disk extent information.
In another embodiment, the disk extent information indicates storage locations of the file that are fragmented across different storage locations within the storage system and wherein the prefetch command transmitted to the storage system indicates to the storage system to cache portions of the file located at the storage locations of the file that are fragmented across different storage locations within the storage system. This embodiment thus substantially eliminates problems associated with conventional caching systems do to file fragmentation issues.
In another embodiment, the host computer system includes a prefetch optimizer process which is integrated and inter-operates with a host prefetcher process. The prefetch optimizer can periodically optimize the prefetch criteria based on cache feedback from the storage system such that subsequent prefetch commands generated based on the prefetch criteria increase cache performance in the storage system.
Another method embodiment of the invention operates in a host computer system and is directed to a method for controlling data cached in a cache in a storage system such as a disk-based data storage system. This method embodiment comprises the steps of receiving a request to access data from an application performing on the host computer system and producing prefetch information containing caching instructions for related data that is related to the data specified in the request to access data by comparing the request to access data against prefetch criteria defined within a prefetch database in the host computer system. The method further obtains storage information for the related data. The storage information indicates a layout of storage locations within the storage system that store the related data. The method generates at least one prefetch command that instructs the storage system to cache the related data from storage locations indicated in the storage information and according to the caching instructions contained in the prefetch information. Finally, the method transmits the prefetch command to the storage system to cause the storage system to cache at least a portion of the related data.
Other embodiments of the invention relate to computer systems configured in various manners, and in particular, to host computer systems which are configured to perform all of the methods and techniques disclosed herein as the invention.
One such embodiment is a computer system comprising a processor, an interface coupled to a storage system, a memory system encoded with a host prefetcher process and prefetch criteria, and an interconnection mechanism coupling the processor, the interface and the memory system. In this embodiment, when the processor performs the host prefetcher process, the processor causes the host computer system to cache data in the storage system. This is done by performing the steps of receiving a request to access data in the storage system and generating a prefetch command for related data based on a comparison of the request against the prefetch criteria encoded in the memory system and transmitting the prefetch command from the host computer system to the storage system via the interface to cause the storage system to cache at least a portion of the related data.
Other such embodiments of a computer system configured in this manner include logic instructions encoded in the memory system to perform all of the methods disclosed herein as the invention. Such embodiments include a host computer system configured to control caching within a data storage system by performing any or all of the aforementioned methods via software control, or via hardware and/or software configured to perform those methods and the techniques disclosed herein as the invention. While preferred embodiments of the invention are implemented as one or more software processes, programs, routines, libraries or other entities that perform (e.g., are executed, interpreted or otherwise operated) within the host computer system, the invention should not be construed as being limited to software and may be performed by circuitry or specialized processors within a host computer system.
Other embodiments of the invention that are disclosed herein include software programs to perform the method operations summarized above and disclosed in detail below. In particular, such embodiments include a computer program product having a computer-readable medium including computer program logic encoded thereon that when performed on a host computer system, causes the host computer system to control caching of data with a storage system. In such embodiments, when the computer program logic is performed on a processor in the host computer system, the computer program logic causes the processor to perform any or all of the method operations disclosed herein as the invention. These embodiments of the invention are typically provided as software on a computer readable medium such as an optical medium (e.g., CD-ROM), floppy or hard disk or other such medium such as firmware in one or more ROM or RAM or PROM chips or as an Application Specific Integrated Circuit (ASIC). The software or firmware or other such configurations can be installed onto a host computer system to cause the host computer system to perform the techniques explained herein as the invention.
It is to be understood that the system of the invention can be embodied strictly as a software program, as software and hardware, or as hardware alone. Is also to be understood that the cache control processes of this invention typically performs (e.g., executes, runs, or is otherwise operated) on a host computer system coupled to a data storage system. The data storage system may be a simple single disk system or may be a highly complex large-scale file server, RAID array or other type of data storage system. An example of such a data storage system is the Symmetrix line of data storage systems manufactured by EMC Corporation of Hopkinton, Mass. The invention may also be embodied in software applications also manufactured by EMC Corporation of Hopkinton, Mass.